<html>
    <head>
        <title>Trang quản lý Thời khóa biểu</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <style type="text/css">
            body{
                font-size: 10pt;
            }
            table{
                 font-size: 10pt;
            }
            table .row1{
                background: #e2e2e2;
            }
            #dcmh{
                margin-top: 7px;
                margin-left: -40px;
                font-size: 10pt;
            }
            #search-dcmh{
                background: #e2e2e2;
                margin: 10px 5px 5px 2px;
            }
            ul.nav{
                margin: 10px 5px 10px 10px;
                overflow: hidden;
                padding: 0px;
                display: inline;
            }
                ul.nav li{
                    display: inline;
                    float: left;
                    margin: 0px 5px;
                    background: #8ab1fe;
                }
                ul.nav li a{
                    color: white;
                    text-decoration: none;
                    display: block;
                    padding: 3px 5px;
                }
                ul.nav li:hover{
                    background: #3A7ABE;
                }
                ul.nav li.current{
                    font-weight: bold;
                    padding: 3px 5px;
                }
   
        </style>
  
</head>
  
    <body>
        <div id="dcmh" align="center">
            <div align="left">
              <legend><font style="font-size:15pt;margin: -10px 10px 10px 8px; color: #0e3460;"><b>Đề cương môn học</b></font></legend><hr />
              <table width="1020" border="1" align="center" cellpadding="0" cellspacing="0">
                          <tr align="center" valign="middle" class="row1" height="22">
                            <td width="35"><strong>STT</strong></td>
                            <td width="100"><strong>Mã môn học </strong></td>
                            <td width="200" ><strong>Tên môn học</strong></td>
                            <td width="58" align="center"><strong>Số TC</strong></td>
                            <td width="90"><strong>Tên tệp tin</strong></td>
                            <td width="90"><strong>Xem nội dung</strong></td>
                            <td width="90"><strong>Dung lượng</strong></td>
                            <td width="90"><strong>Ngày tải lên</strong></td>
                            <td width="90"><strong>Lựa chọn</strong></td>
                          </tr>

                        <?php
                         $sql="select * from decuongmh";
                           $result=  mysql_query($sql);
                            while($row=  mysql_fetch_array($result)){
                                echo "<tr height='22'><td>".$row[0]."</td>";
                                echo "<td>".$row[1]."</td>";
                                echo "<td>".$row[2]."</td>";
                                echo "<td>".$row[3]."</td>";
                                echo "<td>Chưa có</td>";
                                echo "<td></td>";
                                echo "<td></td>";
                                echo "<td></td>";
                                echo "<td></td></tr>";
                            }
                      /*  $display=5;
                        
                        if(isset($_GET['page']) && (int)$_GET['page']){
                            $page=$_GET['page'];
                        }  else {
                            $query="SELECT COUNT(STT) FROM decuongmh";
                            $res=  mysql_query($query);
                            $row=  mysql_fetch_array($res,MYSQL_NUM);
                            $record=$row[0];
                            
                            if($record > $display){
                                $page=$record / $display;
                            }  else {
                                $page=1;
                            }
                        }
                           $start=  (isset($_GET['start']) && (int)$_GET['start'])? $_GET['start']:0;
                      
                         $sql="select * from decuongmh limit $start,$display";
                           $result=  mysql_query($sql);
                            while($row=  mysql_fetch_array($result)){
                                echo "<tr height='22'><td>".$row[0]."</td>";
                                echo "<td>".$row[1]."</td>";
                                echo "<td>".$row[2]."</td>";
                                echo "<td>".$row[3]."</td>";
                                echo "<td>Chưa có</td>";
                                echo "<td></td>";
                                echo "<td></td>";
                                echo "<td></td>";
                                echo "<td></td></tr>";
                                
                                }
                              */
                        ?>
                        </table>
                    <ul class="nav">
                            <?php 
                              /*   if($page >1){
                                    $next=$start + $display;
                                    $prev=$start - $display;
                                    $current=($start/$display)+1;
                                    
                                  if($current !=1){
                                      echo "<li><a href='xemdcmh.php?start=$prev'>Previous</a></li>";
                                  }
                                  //Hiện thị  số link
                                  for($i=1;$i<=$page;$i++){
                                      if($current !=$i){
                                          echo "<li><a href='xemdcmh.php?start=".($display*($i-1))."'>$i</a></li>";
                                      }else{
                                          echo "<li class='current'>$i</li>";
                                      }
                                  }
                                  if($current!=$page && $current < $page-1){
                                        echo "<li><a href='xemdcmh.php?start=$next'>Next</a></li>";
                                    }
                                }*/
                            ?>
                            </ul>
                    </div>
                    
                     
                    <div id="search-dcmh">
                        <span>Tìm kiếm đề cương(Nhập mã/tên môn học hoặc tên tệp tin)</span>
                        <input type="text" size="50" name="search-dcmh" />
                        <input type="submit" value="Tìm kiếm"  name="submit"/>
                    </div>
      </div>
    </body>
</html>